package com.gitee.feizns.quickstart.web.cross;

import lombok.Data;

/**
 * 关于跨域的配置类
 * @author feizns
 * @since 2019/8/6 0006
 */
@Data
public class Cross {

    /**
     * 默认的跨域配置
     */
    public static final Cross DEFAULT = new Cross();

    /**
     * 访问路径
     */
    private String mapping = "/**";

    /**
     * 允许的origin patterns
     */
    private String[] allowedOriginPatterns = new String[] { "*" };

    /**
     * 允许的origins
     */
    private String[] allowOrigins = new String[] {};

    /**
     * 请求类型
     */
    private String[] allowHeaders = new String[] { "*" };

    /**
     * 方法
     */
    private String[] allowMethods = new String[] { "*" };

    /**
     *
     */
    private boolean allowCredentials = true;

}